package com.wzh.bargain;

import com.wzh.common.utils.JwtUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @author WZH
 * @title: BargainApp
 * @projectName miaosha
 * @description:
 * @date 2022/3/8
 */
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.wzh.bargain.dao")
@EnableFeignClients(basePackages={"com.wzh.bargain.feign"})
public class BargainApp {
    public static void main(String[] args) {
        SpringApplication.run(BargainApp.class,args);
    }

    @Bean
    public JwtUtil getJwtUtil(){
        return new JwtUtil();
    }

    @Bean
    public BCryptPasswordEncoder getBCryptPasswordEncoder(){
        return new BCryptPasswordEncoder();
    }
}
